using B.S.BaseData.ErrorCode;
using MediatR;
namespace B.S.BaseData.Api.Read.Command.OrderCommand
{
    /// <summary>
    /// 获取退款申请详情命令
    /// </summary>
    public class GetRefundApplicationDetailCommand : IRequest<APIResult<RefundApplicationDetailDto>>
    {
        /// <summary>
        /// 退款申请ID
        /// </summary>
        public string RefundId { get; set; } = string.Empty;
    }

    /// <summary>
    /// 退款申请详情数据传输对象
    /// </summary>
    public class RefundApplicationDetailDto
    {
        /// <summary>
        /// 退款申请基本信息
        /// </summary>
        public RefundApplicationInfo RefundInfo { get; set; } = new();

        /// <summary>
        /// 订单信息
        /// </summary>
        public RefundOrderInfo OrderInfo { get; set; } = new();

        /// <summary>
        /// 处理信息
        /// </summary>
        public RefundProcessInfo ProcessInfo { get; set; } = new();
    }

    /// <summary>
    /// 退款申请基本信息
    /// </summary>
    public class RefundApplicationInfo
    {
        /// <summary>
        /// 退款申请ID
        /// </summary>
        public string RefundId { get; set; } = string.Empty;

        /// <summary>
        /// 服务编号
        /// </summary>
        public string ServiceNumber { get; set; } = string.Empty;

        /// <summary>
        /// 申请状态
        /// </summary>
        public string ApplicationStatus { get; set; } = string.Empty;

        /// <summary>
        /// 申请时间
        /// </summary>
        public DateTime ApplicationTime { get; set; }

        /// <summary>
        /// 退款方式
        /// </summary>
        public string RefundMethod { get; set; } = string.Empty;

        /// <summary>
        /// 退款类型
        /// </summary>
        public string RefundType { get; set; } = string.Empty;

        /// <summary>
        /// 退款原因
        /// </summary>
        public string RefundReason { get; set; } = string.Empty;

        /// <summary>
        /// 来源
        /// </summary>
        public string Source { get; set; } = string.Empty;

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime? UpdateTime { get; set; }
    }

    /// <summary>
    /// 退款订单信息
    /// </summary>
    public class RefundOrderInfo
    {
        /// <summary>
        /// 订单编号
        /// </summary>
        public string OrderNumber { get; set; } = string.Empty;

        /// <summary>
        /// 用户名
        /// </summary>
        public string UserName { get; set; } = string.Empty;

        /// <summary>
        /// 订单金额
        /// </summary>
        public decimal OrderAmount { get; set; }

        /// <summary>
        /// 实际退款金额
        /// </summary>
        public decimal ActualRefundAmount { get; set; }
    }

    /// <summary>
    /// 退款处理信息
    /// </summary>
    public class RefundProcessInfo
    {
        /// <summary>
        /// 处理人员
        /// </summary>
        public string? ProcessorName { get; set; }

        /// <summary>
        /// 处理时间
        /// </summary>
        public DateTime? ProcessTime { get; set; }

        /// <summary>
        /// 处理备注
        /// </summary>
        public string? ProcessRemarks { get; set; }
    }
} 